// Copyright (C) 2011 YANG Hao (yangh2007@gmail.com). All rights reserved.
//
// This file is part of the (cute)octopus project.
//
// This file may be distributed and/or modified under the terms of the
// GNU General Public License version 2 as published by the Free Software
// Foundation.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Author(s): YANG Hao


#ifndef OSTD_H
#define OSTD_H

#include <QtCore/qglobal.h>
#include <QtGlobal>
#include <QVariant>
#include <QEvent>

#ifdef OCTOPUS_LIB
# define OCTOPUS_EXPORT Q_DECL_EXPORT
#else
# define OCTOPUS_EXPORT Q_DECL_IMPORT
#endif

#define NAMESPACE_BEGIN(Name)	namespace Name{
#define NAMESPACE_END(Name)		}

#define PRIVATE_BEGIN()			namespace OPrivate{
#define PRIVATE_END()			}
#define DECLARE_PRIVATE(Class)	namespace OPrivate{class Class;}
#define ACCESS_PRIVATE(Class)	public: friend class OPrivate::Class;

NAMESPACE_BEGIN(OStd)

/************************************************************************/
/*  enum EventType                                                      */
/************************************************************************/
enum EventType{
	//ExecTaskEvent = QEvent::User + 1,

	Event_TaskStarted = QEvent::User + 2,
	Event_TaskStopped,
	Event_TaskNotify,

	Event_WidgetUpdate
};

/************************************************************************/
/* enum TaskType                                                        */
/************************************************************************/
enum TaskType{
	Task_OpenDoc,
	Task_SaveDoc,

	Task_Deamon,

	Task_User
};

/************************************************************************/
/* enum MWindowActionIndex                                              */
/************************************************************************/
enum ActionIndex{
	//MA_NONE = -1,
	Action_New = 0, 
	Action_Open, 
	Action_Save, 
	Action_SaveAs,
	//Copy, Paste, Cut, Delete,
	//Undo, Redo, NaviB, NaviF, 
	Action_TabView, 
	Action_CascadeSubWindows, 
	Action_TileSubWindows,

	Action_Refresh,

	Action_Help, 
	Action_About,
	Action_Exit,

	Action_Custom
};
//#define MWindowActionCount int(OStd::MA_LAST)

/************************************************************************/
/* enum MWindowMenuIndex                                                */
/************************************************************************/
enum MenuIndex
{
	Menu_None = -1,
	Menu_File = 0, 
	Menu_Edit, 
	Menu_View, 
	Menu_Tools, 
	Menu_Help,

	Menu_Custom
};
//#define MWindowMenuCount int(OStd::Menu_Custom)

/************************************************************************/
/* enum MWindowToolBarIndex                                             */
/************************************************************************/
enum ToolBarIndex{
	ToolBar_None = -1,
	ToolBar_Standard = 0,
	ToolBar_View,

	ToolBar_Creator,
	ToolBar_Widget,

	ToolBar_Custom
};
//#define MWindowToolBarCount int(OStd::MA_LAST)

enum WindowStatusPosition{
	Position_MouseLocation,
	Position_CurrentTool
};

enum DockIndex {
	Dock_None = -1,
	Dock_Property = 0,

	Dock_Custom
};
//#define MWindowDockCount int(OStd::Dock_Custom)

enum TaskState {
	Task_Running,
	Task_Stopped,
	Task_Stopping
};

enum TaskRet {
	Task_Error,
	Task_Canceled,
	Task_Succeed,
	Task_CustomRet
};

NAMESPACE_END(OStd)

#define O_DEVELOP_ICON QIcon(":/omainwind/Resources/icon_octopus.png")

#endif